JPEG (pronounced “jay-peg”) is a standardized image compression mechanism. JPEG stands for Joint Photographic Experts Group, the original name of the committee that wrote the standard. JPEG is designed for compressing either full-color or gray-scale images of natural, real-world scenes. It works well on photographs, naturalistic artwork, and similar material; not so well on lettering, simple cartoons, or line drawings. JPEG handles only still images.
JPEG is “lossy,” meaning that the decompressed image isn't quite the same as the one you started with. JPEG achieves much greater compression than is possible with lossless methods. JPEG is designed to be lossy, and thus exploits the known limitations of the human eye. More specifically, the fact that small color changes are perceived less accurately than small changes in brightness. Thus, JPEG is intended for compressing images that will be looked at by humans. In contrast, the small errors introduced by JPEG may be a problem for images intended to be machine-analyzed.
A useful property of JPEG is that adjusting compression parameters can vary the degree of lossy-ness. This means that the image-maker can trade off file size against output image quality. You can make extremely small files if you don't mind poor quality, such as indexing image archives. Conversely, if you aren't happy with the output quality at the default compression setting, you can increase the quality until you are satisfied, and accept lesser compression.
The JPEG compression algorithm may be implemented in both software and hardware. For example, C-Cubed Microsystems introduced the first JPEG chip for compressing digital video images. Hardware provides the requisite speed for real-time compression. JPEG++, an algorithm described in U.S. Pat. No. 5,014,198, developed by Storm Technology, is an extension to JPEG. JPEG++ allows selected picture areas to be compressed at different ratios depending on the significance of the visual impact to the area in the image.
Similarly, “MPEG,” short for “Moving Picture Experts Group,” and pronounced “em-peg,” refers to the family of digital video compression standards and file formats developed by the group. MPEG generally produces comparable quality video to competing formats, such as Indeo® and Quicktime®; MPEG files can be decoded by special hardware or software. MPEG achieves a high compression rate by storing only the elements of a moving image which change from one frame to another instead of an entire frame. MPEG also uses a type of lossy compression, but the diminishment of data is generally imperceptible to the human eye.
Both MPEG and JPEG compression use an encoding technique called discrete cosine transformation (“DCT”). DCT is a technique for representing waveform data as a weighted sum of cosines, resulting in lossy compression. DCT itself does not lose data, rather the data compression technologies that rely on DCT approximate some of the coefficients to reduce the amount of data.
One problem with the both the traditional JPEG and MPEG algorithms as well as other similar compression techniques, is that they all employ a fixed color space transformation. Generally, a fixed color space transformation is employed to transform an image from RGB into a luminance/chrominance color space (i.e., “YUV”), where luminance is the first component and chrominance the second and third components. To perform the transform a fixed predetermined matrix is employed that transforms the image from a RGB color space into a luminance/chrominance color space represented in an unsigned byte form (i.e., “YCrCb”). The rationale for using a luminance/chrominance color space is that some chrominance information can be lost in an image since the human eye is less likely to perceive the changes in the chrominance or color component of a reconstructed image. As a result, the chrominance components are sub-sampled or reduced, while the luminance component is left at full resolution.
Unfortunately, the use of a predetermined matrix to execute the transformation does not ensure the most information is presented in the first component because it does not consider the wide variety of possible scene content. More specifically, the transformation does not actively control or attempt to provide the most information about an individual image in the first component. Consequently, all images are treated equally despite the errors that may occur when reconstructing a compressed image, and thus affect image perception. Accordingly, images or applications that have a lower tolerance for loss are compressed at lower ratios since more information in the second and third components is required. This results in larger files, and thus less file storage space. In addition, larger files require significantly more time to transmit from a host to a remote site than smaller files. As a result, a method is needed that provides optimal image compression to improve file storage capacity and transmission time, while reducing image quality degradation for a single image or for each frame of an image sequence.